provider Organizations GET /api/0/organizations/{organization_id_or_slug}/stats-summary/
@utdk/sentry /api/0/organizations/{organization_id_or_slug}/stats-summary/
Retrieve an Organization's Events Count by Project
Query summarized event counts by project for your Organization. Also see https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ for reference.
organization_id_or_slug path required
The ID or slug of the organization the resource belongs to.
string
field query required
the `sum(quantity)` field is bytes for attachments, and all others the 'event' count for those types of events. `sum(times_seen)` sums the number of times an event has been seen. For 'normal' event types, this will be equal to `sum(quantity)` for now. For sessions, quantity will sum the total number of events seen in a session, while `times_seen` will be the unique number of sessions. and for attachments, `times_seen` will be the total number of attachments, while quantity will be the total sum of attachment bytes. * `sum(quantity)` * `sum(times_seen)`
enum: sum(quantity), sum(times_seen)
statsPeriod query
This defines the range of the time series, relative to now. The range is given in a `<number><unit>` format. For example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks. You must either provide a `statsPeriod`, or a `start` and `end`.
string
interval query
This is the resolution of the time series, given in the same format as `statsPeriod`. The default resolution is `1h` and the minimum resolution is currently restricted to `1h` as well. Intervals larger than `1d` are not supported, and the interval has to cleanly divide one day.
string
start query
This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `end` instead of `statsPeriod`.
string
end query
This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `start` instead of `statsPeriod`.
string
project query
The ID of the projects to filter by.
array
category query
If filtering by attachments, you cannot filter by any other category due to quantity values becoming nonsensical (combining bytes and event counts). If filtering by `error`, it will automatically add `default` and `security` as we currently roll those two categories into `error` for displaying. * `error` * `transaction` * `attachment` * `replays` * `profiles`
enum: error, transaction, attachment, replays…
outcome query
See https://docs.sentry.io/product/stats/ for more information on outcome statuses. * `accepted` * `filtered` * `rate_limited` * `invalid` * `abuse` * `client_discard` * `cardinality_limited`
enum: accepted, filtered, rate_limited, invalid…
reason query
The reason field will contain why an event was filtered/dropped.
string
download query
Download the API response in as a csv file
boolean

Try it

Authentication
Configure credentials for API Reference
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

retrieveAnOrganizationSEventsCountByProject
GET/api/0/organizations/{organization_id_or_slug}/stats-summary/
Query summarized event counts by project for your Organization. Also see https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ for reference.

Parameters

required

The ID or slug of the organization the resource belongs to.

required

the `sum(quantity)` field is bytes for attachments, and all others the 'event' count for those types of events. `sum(times_seen)` sums the number of times an event has been seen. For 'normal' event types, this will be equal to `sum(quantity)` for now. For sessions, quantity will sum the total number of events seen in a session, while `times_seen` will be the unique number of sessions. and for attachments, `times_seen` will be the total number of attachments, while quantity will be the total sum of attachment bytes. * `sum(quantity)` * `sum(times_seen)`

This defines the range of the time series, relative to now. The range is given in a `<number><unit>` format. For example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks. You must either provide a `statsPeriod`, or a `start` and `end`.

This is the resolution of the time series, given in the same format as `statsPeriod`. The default resolution is `1h` and the minimum resolution is currently restricted to `1h` as well. Intervals larger than `1d` are not supported, and the interval has to cleanly divide one day.

This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `end` instead of `statsPeriod`.

This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `start` instead of `statsPeriod`.

The ID of the projects to filter by.

If filtering by attachments, you cannot filter by any other category due to quantity values becoming nonsensical (combining bytes and event counts). If filtering by `error`, it will automatically add `default` and `security` as we currently roll those two categories into `error` for displaying. * `error` * `transaction` * `attachment` * `replays` * `profiles`

See https://docs.sentry.io/product/stats/ for more information on outcome statuses. * `accepted` * `filtered` * `rate_limited` * `invalid` * `abuse` * `client_discard` * `cardinality_limited`

The reason field will contain why an event was filtered/dropped.

Download the API response in as a csv file

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import sentry from '@utdk/sentry';

await sentry.retrieveAnOrganizationSEventsCountByProject()